import tornado.ioloop
import tornado.web
import global_variable

class IndexHandler(tornado.web.RequestHandler):
    def get(self):
        sql_text = 'SELECT * FROM equipment'
        global_variable.cursor.execute(sql_text)
        data = global_variable.cursor.fetchall()
        data_count = global_variable.cursor.rowcount
        self.render("template/index.html", data_count = data_count, equipment = data)
